//
//  HQBaseNaviController.m
//  WaGuaMall
//
//  Created by 黄华强 on 2019/3/21.
//  Copyright © 2019 黄华强. All rights reserved.
//

#import "HQBaseNaviController.h"
#import "UIImage+HQImageCategory.h"

@interface HQBaseNaviController ()

@end

@implementation HQBaseNaviController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //获得系统全局的导航栏
    UINavigationBar* navBar = self.navigationBar;//appearance 通过这个获得一个全局的单例对象
    //设置标题属性 ----  自身.导航控制器.导航条  setTitle设置标题文本的属性,下面设置的属性有 ：参数1：字体大小(bold是黑体)   参数2:标题前景色
    [navBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:17],NSForegroundColorAttributeName:[UIColor blackColor]}];
    navBar.barTintColor = [UIColor whiteColor];
    navBar.tintColor = [UIColor blackColor];
    
    [navBar setBackgroundImage:[UIImage imageWithColor:[UIColor whiteColor] andAlpha:1] forBarMetrics:UIBarMetricsDefault];
    [navBar setShadowImage:[UIImage imageWithColor:[UIColor whiteColor] andAlpha:1]];
}


#pragma mark - 改动的一些方法

//隐藏返回按钮文字
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
    self.visibleViewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
        
    [super pushViewController:viewController animated:YES];
    
}

@end
